package com.wcl.application.spring.gateway.sdk;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "APPLICATION-AUTH-CENTER", path = "/sdk/auth/center", fallback = AuthCenterFeign.AuthCenterFeignFallBack.class)
public interface AuthCenterFeign {

    @GetMapping("/test")
    String test(@RequestParam("name") String name);

    class AuthCenterFeignFallBack implements AuthCenterFeign {

        @Override
        public String test(String name) {
            return "发生异常";
        }
    }

}
